package example1;

/**
 * <h3>designPattern</h3>
 * <p>鸡蛋装饰器（具体装饰类）</p>
 * @author : zhang.bw
 * @date : 2021-02-26 15:44
 **/
public class EggDecorator extends AbstractDecorator {

	public EggDecorator(ABattercake aBattercake) {
		super(aBattercake);
	}

	@Override
	protected void doSomething() {
	}

	@Override
	protected String getDesc() {
		return super.getDesc() + " 加一个鸡蛋";
	}

	@Override
	protected int cost() {
		return super.cost() + 1;
	}

	public void egg() {
		System.out.println("增加了一个鸡蛋");
	}
}
